/*
 * @Author: mikey.zhaopeng 
 * @Date: 2018-12-30 10:20:14 
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-01-12 10:34:45
 */
import 'package:flutter/material.dart';
import '../../widgets/search_bar.dart' show SearchBar;
//tab页面
import './tab.dart' show HomeTab;
// 头部右侧下载按钮
import '../../widgets/icon_widget/down.dart' show DownIcon;


class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Container(
          child: Row(
            children: <Widget>[
              Expanded(
                child: GestureDetector(
                  child: SearchBar(
                    enable: false,
                    placeHolder: "搜索游戏",
                  ),
                  onTap: () {
                    Navigator.pushNamed(context, '/search');
                  },
                ),
              ),
              DownIcon(),
            ],
          ),
        ),
        elevation: 0,
        backgroundColor: Colors.white,
      ),
      body: Center(
        child: HomeTab(),
      ),
    );
  }
}
